<?php
echo(XML_PROLOG.EOL);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="fr">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>
      MyChoonz
    </title>
    <script type="text/javascript" src="app/lib/jquery/ufo.js"></script>
    <script type="text/javascript" src="app/lib/jquery/jquery-latest.js"></script>
    <script type="text/javascript" src="app/lib/jquery/interface.js"></script>
    <script type="text/javascript" src="app/lib/jquery/jquery.tabs.pack.js"></script>
    <script type="text/javascript" src="app/lib/jquery/jquery.editable.js"></script>
    <script type="text/javascript" src="app/lib/jquery/jqModal.js"></script>
    <script type="text/javascript" src="?c=langjs"></script>
    <script type="text/javascript" src="app/mvc/c/func.js"></script>
    <script type="text/javascript" src="app/mvc/c/init.js"></script>
    <link id="screenStyles" href="app/skin/<?php echo($_SESSION['MczSession']->getSkin());?>/screen.css" type="text/css" rel="stylesheet" media="print, projection, screen" />
    <!--[if lte IE 7]>
    <link rel="stylesheet" href="app/skin/tabs_ie.css" type="text/css" media="projection, screen" />
    <![endif]-->
  </head>
  <body style="direction: ltr;" onmouseover="a=1;" onmouseout="a=0;" onmouseleave="a=0;" onBeforeUnload="if(a==0)return(str.hlp_before_quit);">
  <div id="help"></div>
 <!--<div id="watch"></div>-->
  <div id="mainContent">
    <div id="onglets">
        <ul>
          <li><a id="libTabLink" href="#libraryTab" onmouseover="help(str.hlp_library_tab);"><?php echo(ucwords(STR_UI_LIBRARY));?></a></li>
          <li><a id="podTabLink" href="#podcastsTab" onmouseover="help(str.hlp_podcasts_tab);"><?php echo(ucwords(STR_UI_PODCASTS));?></a></li>
          <li><a id="plsTabLink" href="#playlistsTab" onmouseover="help(str.hlp_playlists_tab);"><?php echo(ucwords(STR_UI_PLAYLISTS));?></a></li>
          <li><a id="prefTabLink" href="#prefsTab" onmouseover="help(str.hlp_prefs_tab);"><?php echo(ucwords(STR_UI_PREFS));?></a></li>
          <?php if($_SESSION['MczSession']->isAdmin()){echo('<li><a id="admTabLink" href="#adminTab" onmouseover="help(str.hlp_admin_tab);">'.ucwords(STR_UI_ADMIN).'</a></li>');}?>
        </ul>
      <div id="libraryTab">
      <form action="#" method="post" onsubmit="doSearch();return false;">
        <input type="text" name="keyword" id="keyword" />
        <input type="submit" value="<?php echo(STR_UI_OK);?>"/>
      </form>

        <div id="dataGrid"><?php echo($_SESSION['Search']->mkHtml()); ?></div>
        
        <?php
        if($_SESSION['MczSession']->can('add_file'))
          {
            echo('<input type="image" onmouseover="help(str.ui_import);" src="app/skin/transparent.gif" class="btnAddFolder" alt="'.STR_UI_IMPORT.'" onclick="window.open(\'?c=import\',\'import\',\'menubar=no, status=no, scrollbars=yes, menubar=no, width=400, height=300\');return false;"/>');
          }
        ?>
      </div><!--end#libraryTab-->
      <div id="podcastsTab">
        <div id="podcastsManagement">
          <form method="post" action="#">
              <div id="podcastsList">
                <?php echo(PodcastReader::getPodcasts());?>
              </div><!--end#podastList-->
              <div id="podcastView"></div>
          </form>
        </div><!--end#podcastsManagement-->
        <div id="podcastDisplay">
        </div><!--end#podcastDisplay-->
      </div><!--end#podcastsTab-->
      <div id="playlistsTab">
      <div id="plsList">
      <?php echo(PlayList::getPlaylists());?>
      </div>
      <div id="playlistSpace"></div>
      </div>
      <div id="prefsTab">
        <?php echo($_SESSION['MczSession']->mkPrefForm());?>
      </div><!--end#prefsTab-->
      <?php if($_SESSION['MczSession']->isAdmin()){echo('<div id="adminTab">
      <fieldset>
        <legend>'.STR_UI_USERS.'</legend>
        <div id="usersList">'.User::listUsers().'</div>
        <div id="userForm"></div>
        </fieldset>
        <fieldset>
        <legend>'.STR_UI_GROUPS.'</legend>
        <div id="groupsList">'.Group::listGroups().'</div>
        <div id="groupForm"></div>
        </fieldset>
      </div><!--end#adminTab-->');}?>
    </div><!--end#tabs-->
  </div><!--end#content-->
  <div id="player">
    <div id="controlSpace">
        <span class="btnPlayerSpace"><input type="image" src="app/skin/transparent.gif" onmouseover="help(str.hlp_toggle_pause);" id="btnPlayer" class="btnPlay" value="" onclick="playNext();return false;" /></span>
        <span class="btnNextSpace"><input type="image" src="app/skin/transparent.gif" onmouseover="help(str.hlp_play_next);" value="" id="btnNext" class="btnNext" onclick="playNext();return false;"/></span>
        <span class="currLabel" id="currLabel" onmouseover="help($(this).html());"></span>
    </div><!--end#controlSpace-->
    <div id="playerSpace">
      <div id="playerSlider" class="playerSlider" onmouseover="help(str.hlp_drag);">
        <div id="playerCursor" class="playerCursor" onmouseover="help(str.hlp_play_cursor);"></div>
        <div class="playerLbl" id="playerLbl"></div>
      </div>
    </div>
    <input type="image" src="app/skin/transparent.gif" class="btnCueEmpty" onmouseover="help(str.hlp_empty_cue);" onclick="removeAllFromCue();return false;"/>
    <input type="image" src="app/skin/transparent.gif" class="btnCueSaveAs" onmouseover="help(str.hlp_save_cue_as);" onclick="snapshotCueList();return false;"/>
    <div id="cueListSpace">
      <?php
        echo($_SESSION['CueList']->mkHtml());
      ?>
    </div>
  </div>
  <div id="ajaxStatus" style="display:none;clear:both;"><?php echo(STR_UI_LOADING);?></div>
  <div id="iframeContainer" class="jqmWindow"><iframe id="wikiframe" src="" class="browserpage"></iframe></div>
  <div id="modal" class="jqmWindow" style="display:none;">This is a modal window</div>
  <input type="hidden" id="token" name="token" value="<?php echo($_SESSION['MczSession']->getToken());?>"/>
  <div id="debugSpace" style="clear:both; margin-top:50px;">
  <?php
  //Tools::debugInfos();
  ?>
  </div>
  <div id="dbg"></div>
  <div id="playaSpace">Get Flash</div>
  </body>
</html>
